import { defineStore } from 'pinia';
import type { UserDTO } from '../type/User';

export const useUserStore = defineStore('user', {
  state: () => {
    const userInfo : UserDTO ={}
   
    return {userInfo}
  },

  actions: {
    
    setUserInfo(newUserInfo: UserDTO) {
      this.userInfo = newUserInfo;
    },

    removeUserInfo() {
      this.userInfo = {};
    }
  },
  persist:true

  
});